<?php
$bodyParams = $route->bodyParams;

$defaultStr = "";

if($bodyParams['fieldDefault']!=""){
    $defaultStr = "DEFAULT '{$bodyParams[fieldDefault]}'";
}

$SQL = "ALTER TABLE {$bodyParams['tableName']} ADD COLUMN {$bodyParams['fieldName']} {$bodyParams['fieldType']} {$defaultStr} COMMENT '{$bodyParams['fieldNote']}'";

$rsData = $db->mysqlDB->query($SQL);

$response->responseData(true,array("rs"=>$rsData,"sql"=>$SQL));
